<?php
require_once '../utils/common.php';
checkUserValidate ();
$id = $_REQUEST ['id'];
$fatherid = $_REQUEST['fatherid'];
if ($id != - 1) {
	$con = mysql_connect ( host, username, password );
	if (! $con) {
		die ( 'Could not connect: ' . mysql_error () );
	}
	mysql_select_db ( db, $con );
	$sql = "set names utf8";
	mysql_query ( $sql );
	$sql = "select * from j_tab_tel where id=" . $id . " and fatherid=".$fatherid;
	$result = mysql_query ( $sql );
	if ($row = mysql_fetch_array ( $result )) {
		$name = $row ['name'];
		$tel = $row ['tel'];
	}
	mysql_close ( $con );
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理系统</title>
<link href="../CSS/form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../js/jquery-1.10.1.js"></script>
<script type="text/javascript">
	$(function(){
		
	})
</script>
</head>

<body>
	<fieldset>
		<legend>修改电话</legend>
		<form action="TelProcess.php" method="post" class="form">
			<input type="hidden" name="type" value="update" />
			<input type="hidden" name="id" value="<?=$id?>" />
			<input type="hidden" name="fatherid" value="<?=$fatherid?>" />
			<ul>
				<li><label>名字:</label></li>
				<li><input type="text" name="name" id="name" class="txt" value="<?=$name?>"/></li>
				<li><label>电话:</label></li>
				<li><input type="text" name="tel" id="tel" class="txt" value="<?=$tel?>"/></li>
				<li><input type="submit" value="修改" class="btn" /></li>
			</ul>
		</form>
	</fieldset>
</body>

</html>